package demo530;

public class Demo1 {
        public static void main(String[] args) {
            EmployeeDAO dao = new EmployeeDAO();

            // 创建并添加第一个员工
            Employee employee1 = new Employee("E001", "张三", "123", 30);
            boolean result1 = dao.addEmployee(employee1);
            System.out.println("员工1添加结果：" + (result1 ? "成功" : "失败"));

            // 创建并添加第二个员工
            Employee employee2 = new Employee("E002", "李四", "456", 25);
            boolean result2 = dao.addEmployee(employee2);
            System.out.println("员工2添加结果：" + (result2 ? "成功" : "失败"));

            // 创建并添加第三个员工
            Employee employee3 = new Employee("E003", "王五", "789", 28);
            boolean result3 = dao.addEmployee(employee3);
            System.out.println("员工3添加结果：" + (result3 ? "成功" : "失败"));
        }
    }




